Imaging devices such as a digital camera generally incorporate an autofocus (AF) unit to automatically focus a subject. For example, a so-called hill climb autofocus control method for the AF unit is known (disclosed in Japanese Examined Laid-open Patent Publication No. 39-5265 (Reference 1), for example). The hill climb autofocus control is to focus a subject based on an AF evaluation value indicating a degree of focus which is calculated by integrating differences in brightness of neighboring pixels included in video signals which are output from an image sensor according to an optical image of a subject via an imaging lens.
When a subject is in focus, the edge portion of a subject image is sharp and clear while when a subject is not in focus, the edge portion thereof blurs. Moreover, a difference in brightness of video signals of neighboring pixels of a subject image in in-focus state is large and that in non-in-focus state is small. That is, the AF evaluation value is maximal in in-focus state.
The AF unit is configured to acquire a video signal of a subject image at a predetermined timing while moving an imaging lens, calculate an AF evaluation value according to the video signal at each timing, and focus the subject by automatically moving the imaging lens to a position in which a video signal with a maximal AF evaluation value is obtained. Thus, by the hill climb autofocus control, the imaging lens is automatically moved to an in-focus position by detecting the maximal value of AF evaluation values calculated with predetermined timing while moving the imaging lens.
Note that the position of the imaging lens in the in-focus state is referred to as in-focus position and a range in which the imaging lens is moved to calculate the AF evaluation value is referred to as focus search range.
Japanese Patent No. 3851027 (Reference 2) discloses a more precise, high-speed hill autofocus control which comprises a first mode in which the AF evaluation value is calculated with a minute interval and a second mode in which the AF evaluation value is sampled with a rough interval until the imaging lens approaches the in-focus position and it is calculated with a minute interval when the imaging lens is in the vicinity of the in-focus position, for example. By using the first and second modes separately, it is possible to perform the autofocus operation at high speed and more quickly bring a subject into focus.
Further, Japanese Laid-open Patent Publication No. 2008-58559 (Reference 3) discloses an AF control method for focus re-adjustment after a subject is brought into focus, to store a subject image in a previous in-focus position and compare the previous image and a current image to calculate a matching degree and to narrow a focus search range when the matching degree is in a predetermined range, for example.
However, the AF control method disclosed in Reference 2 has a problem that when a subject in focus moves, performing minute sampling after rough sampling requires some time so that it is not possible to perform AF control quickly enough to deal with the moving. That is, a motion of a subject during the autofocus operation causes repetition of the autofocus, which may result in failing to capture the subject in focus. In order to solve this problem, there is a demand for a novel AF control to be able to follow motion in a subject image acquired via an imaging lens by controlling autofocus of the imaging lens to move in a minute range.
The AF control method disclosed in Reference 3 cannot be effective unless a subject is captured in the in-focus position. Since it is not configured to follow a subject over time or a change in the subject, it does not operate unless the subject is in focus, and takes a lot of time to complete the AF operation. Moreover, the focus search range is uniformly reduced irrespective of a lens position so that with a change in a distance from a subject, the AF control takes more time. In view of solving the problem, there is a demand for a novel AF control to be able to estimate an in-focus position by narrowing the focus search range and performing autofocus in a minute search range even without having the subject in focus, and as well as to be able to change the focus search range in accordance with which of the position on telephoto side or wide side the imaging lens is in for autofocus.